package site.haoyin.bluetoothdemo.utils;

import android.content.Context;
import android.widget.Toast;

import site.haoyin.bluetoothdemo.application.DemoApplication;

public class ToastUtil {

    public static void showShort(int msg) {
        Context mContext = DemoApplication.getInstance()
                .getApplicationContext();
        Toast.makeText(mContext, mContext.getString(msg), Toast.LENGTH_SHORT)
                .show();
    }
    public static void showShort(String msg) {
        Context mContext = DemoApplication.getInstance()
                .getApplicationContext();
        Toast.makeText(mContext, msg, Toast.LENGTH_SHORT)
                .show();
    }

    public static void showLong(String msg) {
        Context mContext = DemoApplication.getInstance()
                .getApplicationContext();
        Toast.makeText(mContext, msg, Toast.LENGTH_SHORT)
                .show();
    }

    public static void showLong(int msg) {
        Context mContext = DemoApplication.getInstance()
                .getApplicationContext();
        Toast.makeText(mContext, mContext.getString(msg), Toast.LENGTH_LONG)
                .show();
    }
}